home *** CD-ROM | disk | FTP | other *** search
- /******************************************************************
- * *
- * Macro to change all occurrences of a string to a second string *
- * *
- ******************************************************************/
- trace off
- options results
- parse arg source destination .
- if source = '' then do
- 'input Enter search string'
- source=result
- end
- if result = '' then exit 1 /* changes mind */
- if destination = '' then do
- 'input Enter replacement string'
- destination=result
- end
- 'search first' source
- if rc = 0 then do
- 'search replace' destination
- do while rc=0
- 'search next'
- if rc=0 then 'search replace' destination
- end
- end
-